<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>第6单元日考测试</title>
    <style>
        .password {
            position: relative;
            width: 400px;
            height: 300px;
            background: url('bj.jpg');
        }

        .p-content {
            position: absolute;
            top: 110px;
            left: 93px;
        }

        .password span {
            display: inline-block;
            width: 50px;
            height: 50px;
            background: #000;
            margin-left: 16px;
            color: red;
            line-height: 50px;
            text-align: center;
            font-size: 20px;
        }

        .password h1 {
            text-align: center;
        }
    </style>
</head>

<body>
    <div class="password">
        <h1>密室逃脱</h1>
        <p class="p-content"><span>true</span><span>false</span><span>true</span></p>
    </div>
    <script>
        // // （1）将页面中的虚拟密码“true false true”。（50分）
        // var spans = document.getElementsByTagName("span");
        // var spans1Value = spans[0].innerHTML
        // var spans2Value = spans[1].innerHTML
        // var spans3Value = spans[2].innerHTML
        // // （2）将获取的虚拟密码转为布尔值（25分）
        // var span1ToBoolean = !!spans1Value
        // if (spans2Value == "false") {
        //     var span2ToBoolean = false
        // } else {
        //     var span2ToBoolean = !!spans2Value
        // }
        // var span3ToBoolean = !!spans3Value
        // // 再将布尔值的密码转为真实数字密码输出“XXX密码，闯关成功！”
        // var span1ToNumber = +span1ToBoolean
        // var span2ToNumber = +span2ToBoolean
        // var span3ToNumber = +span3ToBoolean
        // console.log(span1ToNumber, span2ToNumber, span3ToNumber)
        // var a = 1, b = 9, c = 5;






    </script>
</body>

</html>